<!doctype html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="keywords" content="microblog" />
	<title>Microblog</title>
	<link rel="stylesheet" href="/static/style.css" type="text/css" media="screen"/>
	<script type="text/javascript" src="/static/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="/static/post.js"></script>
	<script type="text/javascript">

	  var _gaq = _gaq || [];
	  _gaq.push(['_setAccount', 'UA-17583595-5']);
	  _gaq.push(['_trackPageview']);

	  (function() {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	  })();

	</script>
	{% block head %}{% endblock %}
</head>
<body>
{% load i18n %}
	<div id="TopWrap" class="blue-bg">
		<div id="Top">
			<div id="LogoWrap">
				<div id="Logo" class="font-shadow">
					<a href="/">Microblog</a>
				</div>
				<div id="MenuTabWrap" class="font-shadow-light">{% block menutab %}{% endblock %}</div>
			</div>
			<div id="MenuWrap">
				<div id="Menu">
					<ul>
						{% if user.is_authenticated %}
						<li>Hi <span id="AuthorName">{{user.get_profile.nickname}}</span>{% trans 'Welcome back' %}</li>
						<li><a href="/mail/inbox/">{%if user.get_profile.gen_unread_count %}<img src="/static/mail_1.png" width="15" height="15" border="0"/>{% else %}<img src="/static/mail_0.png" width="15" height="15" border="0"/>{% endif %}</a></li>
						<li>[<a href="/mail/inbox/"><span {%if user.get_profile.gen_unread_count %}class="color-newmail-counter"{% endif %}>{{ user.get_profile.gen_unread_count }}</span></a>]</li>
						<li><a href="/favorite/"><img src="/static/favorite.png" width="15" height="15" border="0"/></a></li>
						<li><a href="/favorite/">{% trans 'Favorite' %}</a></li>
						<li><a href="/settings/">{% trans 'Settings' %}</a></li>
						<li><a href="/passport/logout/">{% trans 'Logout' %}</a></li>
						{% else %}
						<li><a href="/passport/login/">{% trans 'Login' %}</a></li>
						<li><a href="/passport/signup/">{% trans 'Signup' %}</a></li>
						{% endif %}
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div id="MidWrap">
		<div id="MidOneWrap">
			<div id="MidOne">{% block main %}{% endblock %}</div>
		</div>
	</div>
	<div id="BottomWrap">
		<div id="BottomOne">
			<div id="CopyRight">Copyright © 2011 - 2012 Micoblog All Rights Reserved</div>
			<div id="LanguageSelect">
				<form action="/i18n/setlang/" method="post">
				{% csrf_token %}
				<input name="next" type="hidden" value="{{ request.path }}" />
				<select name="language">
				{% for lang in LANGUAGES %}
				<option value="{{ lang.0 }}"  {%ifequal LANGUAGE_CODE lang.0 %}selected="selected"{% endifequal %}>{{ lang.1 }}</option>
				{% endfor %}
				</select>
				<input type="submit" value="Go" />
				</form>
			</div>
		</div>
	</div>
</body>
</html>